<?php
// 登录
class LogoutAction extends Action {
	
	private $cLogs = null;
	
	function __construct(){
		import('@.ORG.Logs');
		$this->cLogs 		= new Logs();
	}
	
    public function index(){

        //管理员的id
        import("@.ORG.Admin");
        $cAdmin = new Admin();

        //登录当前管理员
        $admin = $cAdmin->logged_info();

        if(!is_null($admin)){
            $this->cLogs->add('Logout:index','管理员退出成功');
            //销毁session
            session_destroy();
        }

    	redirect('/index.php/Admin/Login',0,'已安全退出');
    }
}
?>